package com.isoft.airportsystem.entity.change;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName("NOTIFICATION_RECORD")
public class NotificationRecord {    // 通知记录
    @TableId(value = "RECORD_ID", type = IdType.ASSIGN_UUID)
    private String recordId;  // 记录ID

    private String subscriptionId;  // 订阅ID（允许为空）
    private String notificationType;  // 通知类型
    private String notificationAddress;  // 通知地址
    private Date sendTime;  // 发送时间
    private String sendStatus;  // 发送状态
    private String errorMessage;  // 错误信息
    private String eventType;     // 事件类型
    private String flightId;      // 航班ID

    // 添加默认值设置
    public NotificationRecord() {
        this.subscriptionId = "SYSTEM_GENERATED";
        this.eventType = "SYSTEM_EVENT";
        this.flightId = "SYSTEM";
    }
}